package com.xxxx.yoyo.bean;

/**
 * 这是购买项类，对应数据库的item表 , 一个Item对应订单中（或购物车）中一种宠物
 * @author cai cai
 *
 */
public class Item {
	private Integer id;			//购买项的id
	private Double price;		//购买项的单价
	private Integer amount;		//购买数量
	private Integer goodId;		//宠物id,即购买的是哪个宠物
	private Integer orderId;	//订单id,即购买的宠物属于哪个订单
	
	private Goods goods;		//宠物信息
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	public Integer getGoodId() {
		return goodId;
	}

	public void setGoodId(Integer goodId) {
		this.goodId = goodId;
	}

	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	
	
	public Item(Double price, Integer amount, Integer goodId, Goods goods) {
		super();
		this.price = price;
		this.amount = amount;
		this.goodId = goodId;
		this.goods = goods;
	}

	public Item() {
		super();
	}

	@Override
	public String toString() {
		return "Item [id=" + id + ", price=" + price + ", amount=" + amount + ", goodId=" + goodId + ", orderId="
				+ orderId + ", goods=" + goods + "]";
	}

	
}
